package com.fastCms.business.mall.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 产品主表
 * </p>
 *
 * @author lsquan
 * @since 2019-04-09
 */
@ApiModel(value = "Product对象", description = "产品主表")
@Data
public class Product extends Model<Product> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "组织编号")
    private String organizeCode;

    @ApiModelProperty(value = "品牌id")
    private String brandId;

    @ApiModelProperty(value = "品类Id")
    private String categoryId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "子标题")
    private String subTitle;

    @ApiModelProperty(value = "产品类型（实物商品,服务商品）")
    private String productType;

    @ApiModelProperty(value = "产品代码")
    private String productCode;

    @ApiModelProperty(value = "产品编号")
    private String productNumber;

    @ApiModelProperty(value = "商品首图")
    private String mainImageUrl;

    @ApiModelProperty(value = "商品视频url")
    private String productVideo;

    @ApiModelProperty(value = "产品单价")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "产品原价")
    private BigDecimal originalPrice;

    @ApiModelProperty(value = "成本价")
    private BigDecimal costPrice;

    @ApiModelProperty(value = "sku最低价")
    private BigDecimal skuMinPrice;

    @ApiModelProperty(value = "sku最高价")
    private BigDecimal skuMaxPrice;

    @ApiModelProperty(value = "富文本id")
    private String explainId;

    @ApiModelProperty(value = "剩余总库存")
    private Integer remainStock;

    @ApiModelProperty(value = "总库存")
    private Integer totalStock;

    @ApiModelProperty(value = "是否支持退款:TRUE:支持;FALSE;默认值FALSE")
    private String canRefund;

    @ApiModelProperty(value = "退款模式(1.未消费随时可退 2.不可退 3.人工审核)")
    private Integer refundModel;

    @ApiModelProperty(value = "配送模式（1-自发 2-代发）")
    private Integer deliverMode;

    @ApiModelProperty(value = "退款规则，文本格式，默认为空")
    private String refundInfo;

    @ApiModelProperty(value = "预约时间模式:1-默认时间模式2-自定义时间模式")
    private Integer reserveTimeMode;

    @ApiModelProperty(value = "微商城产品状态(状态枚举）")
    private Integer storeStatus;

    @ApiModelProperty(value = "是否有sku  1：是 0：否")
    private Integer hasSku;

    @ApiModelProperty(value = "商城销售总数")
    private Integer storeSaleCount;

    @ApiModelProperty(value = "商城销量总额")
    private BigDecimal storeSaleTotal;

    @ApiModelProperty(value = "商城基础销量")
    private Integer storeBaseSaleCount;

    @ApiModelProperty(value = "是否支持普通会员卡折扣(1支持2.不支持）")
    private Integer canMemberCard;

    @ApiModelProperty(value = "是否支持付费会员卡折扣(1支持2.不支持）")
    private Integer canMemberDiscard;

    @ApiModelProperty(value = "上架时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date onSaleTime;

    @ApiModelProperty(value = "医院[1,2]")
    private String hospitalIds;

    @ApiModelProperty(value = "提货门店IDs=[6,10]")
    private String storeIds;

    @ApiModelProperty(value = "快递是否包邮(1-包邮2-按重计费)")
    private Integer expressFree;

    @ApiModelProperty(value = "商品预售状态;1-开启2-关闭")
    private Integer bookingSaleStatus;

    @ApiModelProperty(value = "商品预售时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date bookingSaleTime;

    @ApiModelProperty(value = "商品重量（kg）")
    private Double weight;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", update = "now()")
    private Date updateTime;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "1-正常0-已删除")
    private Integer state;

    public Product() {
        super();
    }

}
